﻿using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Records;
using System;
using NineSeas.Extensions;
using Orchard.Users.Models;

namespace NineSeas.Models
{
    public class AuthorProfilePart: ContentPart<AuthorProfilePartRecord>, ILikeable
    {
        public string DisplayName
        {
            get { return Record.DisplayName; }
            set { Record.DisplayName = value; }
        }
        public string StatusMessage
        {
            get { return Record.StatusMessage; }
            set { Record.StatusMessage = value; }
        }
        public string Phone
        {
            get { return Record.Phone; }
            set { Record.Phone = value; }
        }
        public string DateOfBirth
        {
            get { return Record.DateOfBirth; }
            set { Record.DateOfBirth = value; }
        }
        public string BannerColor
        {
            get { return Record.BannerColor; }
            set { Record.BannerColor = value; }
        }
        public string AvatarUrl
        {
            get { return Record.AvatarUrl; }
            set { Record.AvatarUrl = value; }
        }
        public string AvatarStoragePath
        {
            get { return Record.AvatarStoragePath; }
            set { Record.AvatarStoragePath = value; }
        }
        public int TotalLikes
        {
            get { return Record.TotalLikes; }
            set { Record.TotalLikes = value; }
        }
        public int WeekLikes
        {
            get { return Record.WeekLikes; }
            set { Record.WeekLikes = value; }
        }
        public DateTime? CreatedUtc
        {
            get { return Record.CreatedUtc; }
            set { Record.CreatedUtc = value; }
        }

        public int BookCount
        {
            get { return Record.BookCount; }
            set { Record.BookCount = value; }
        }

        public int BookCountWeek
        {
            get { return Record.BookCountWeek; }
            set { Record.BookCountWeek = value; }
        }

        public string Dimension
        {
            get { return Constants.VotingDimensions.AuthorLike; }
        }

        public UserPart User
        {
            get
            {
                return this.As<UserPart>();
            }
        }
    }
}